<!DOCTYPE html>
<html>

	<head>
		<meta charset="UTF-8">
		<title>{$store_info.title}_{$web_name}</title>
		<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
		<meta name="Keywords" content="{$store_info.keywords}" />
		<meta name="Description" content="{$store_info.description}" />
		<meta http-equiv="X-UA-Compatible" content="IE=edge,Chrome=1" />
		<meta name="format-detection" content="telephone=no">
		<tc_include file="Public:head" />
		<link rel="stylesheet" type="text/css" href="/themes/wnsc/Home/Store/template/demo/css/shop_index.css" />
	</head>

	<body>
		<php>
			$tree=sp_get_store_menu_tree($_GET['id']);
			
		</php>
		<tc_include file="Public:nav_store" />
		<div class="layout" >
			<div class="shop-header-banner">
				<img src="{$store_template_info.banner}">
			</div>
			<div class="shop-menu">
				<div class="shop-menu-box">
					<ul class="shop-menu-left">
						<li>
							<a href="{:U('store/index',array('id'=>$_GET['id']))}" target="">首页</a>
						</li>
						<li class="all-category">
							<a href="{:U('store/index',array('id'=>$_GET['id']))}" target="">
								全部分类
								<span class="arrow"></span>
							</a>
							<div class="all-category-coupon" style="display: none;">
								<!-- 获取店铺内商品分类 -->
								<dl>
									<dt>
										<a href="{:U('store/type',array('id'=>$_GET['id'],'shop_id'=>0))}" target="_blank">全部商品 &gt;</a>
									</dt>
									<dd>
										<ul></ul>
									</dd>
								</dl>
								<foreach name="tree" item="vo">
									<dl>
										<dt>
										<a href="{:U('store/type',array('id'=>$_GET['id'],'shop_id'=>$vo['id']))}" target="_blank">{$vo.label} &gt;</a>
									</dt>
										<dd>
											<ul>
												<foreach name="vo['child']" item="v">
													<li>
														<a href="{:U('store/type',array('id'=>$_GET['id'],'shop_id'=>$v['id']))}" target="_blank">{$v.label}</a>
													</li>
												</foreach>

											</ul>
										</dd>
									</dl>
								</foreach>

							</div>
						</li>
						<!-- 获取店铺导航 -->
					</ul>
					<ul class="shop-menu-right">
						<foreach name="tree" item="vo">
							<li class="shop-nav">
								<a href="{:U('store/type',array('id'=>$_GET['id'],'shop_id'=>$v['id']))}">{$vo.label}</a>
							</li>
						</foreach>

					</ul>
				</div>
			</div>
		</div>

		<div class="layout" style="min-height:400px;">
			
			<!-- banner模块 _start -->
			<div class="banner">

				<ul id="fullScreenSlides" class="full-screen-slides">
					<foreach name="banners" item="v">
						<li <eq name="key" value="0">style="display: list-item;"</eq>>
							<a href="javascript:;"  style="background:url({$v}) no-repeat center center;"></a>
						</li>
					</foreach>
				</ul>
				<ul class="full-screen-slides-pagination">
					<foreach name="banners" item="v">
						<li <eq name="key" value="0">class="current"</eq>>
							<a href="javascript:void(0);">{$key}</a>
						</li>
					</foreach>
					
				</ul>

			</div>
			<!-- banner模块 _end -->
		 	<foreach name="store_class_list " item="v">
			<!-- 内容开始 -->
			<div class=" custom-box">
				<div class="custom">

					<div style="text-align:center;">
						<h2 class="shop3-title"><hr><span class="title">{$v['class_name']}</span></h2>
					</div>

				</div>
			</div>
			<!-- 内容结束 -->
			<!-- 楼层 _start -->
			<div class="w1210 shop-floor">

				<div class="shop-goods-list">

					<ul>
						<foreach name="v['shop_list']" item="vo">
						<li <eq name="key" value="0">class="first"</eq>> 
							<dl>
								<dt class="goods-thumb">
								<a target="_blank" href="{:U('shop/index',array('id'=>$vo[id]))}" title="{$vo.title}" >
									<img  src="{$vo.image}" style="display: inline;">
								</a>
								</dt>
								<dd class="goods-info">
									<a target="_blank" href="{:U('shop/index',array('id'=>$vo[id]))}" title="{$vo.title}" class="goods-name">{$vo.title}</a>
									<p>
										<span class="goods-price color fl">￥{$vo.price}</span>
										<a target="_blank" href="{:U('shop/index',array('id'=>$vo[id]))}" title="立即抢购" class="shop-add-cart fr">立即抢购</a>
									</p>
								</dd>
							</dl>
						</li>
						</foreach>
					</ul>
				</div>

			</div>
			<!-- 楼层 _end -->
			</foreach>
		</div>
		<tc_include file="Public:footer" />
		<script type="text/javascript">
			//店铺评分鼠标经过事件
			$(".shop-info").hover(function() {
				$('.extra-info').toggleClass('active');
			});
			//店铺全部分类鼠标经过事件
			$(".all-category").hover(function() {
				$(this).find('.all-category-coupon').show();
			}, function() {
				$(this).find('.all-category-coupon').hide();
			});
			
		//首页banner图轮播
		function banner_play(a,b,c,d){
			var blength = $(a).length;
			if(blength > 1){
				$(b).mouseover(function(){
					$(this).addClass(c).siblings().removeClass(c);
					$(a).eq($(this).index()).hide().fadeIn().siblings().fadeOut();
					
					num=$(this).index();
					clearInterval(bannerTime);	
				});
				var num=0;
				function bannerPlay(){
					num++;
					if(num>blength-1){
						num=0;	
					}
					$(b).eq(num).addClass(c).siblings().removeClass(c);
					$(a).eq(num).hide().fadeIn().siblings().fadeOut();	
				}
				var bannerTime = setInterval(bannerPlay,6000);
				$(d).hover(function(){
					clearInterval(bannerTime);	
				},function(){
					bannerTime = setInterval(bannerPlay,6000);	
				})
			}
		}
		
		$.each($('.banner'),function(){
			var a = $(this).find('.full-screen-slides li');
			var b = $(this).find('.full-screen-slides-pagination li');
			var c = 'current';
			var d = $(this).find('#fullScreenSlides');
			banner_play(a,b,c,d);//首页主广告轮播
		});
		</script>
	</body>

</html>